package com.tansun.easycare.rule.ruleproj.model;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeedev.msdp.base.entity.SysUser;
import com.tansun.easycare.modules.sys.utils.UserUtils;
import com.tansun.easycare.rule.common.BaseVO;

public class RuleprojectVO extends BaseVO<RuleprojectVO> implements Serializable{
	private static final long serialVersionUID = 1L;
    private String id;					//项目id
	private String projectname;        // 规则项目名
	private String projectcode;        // 规则编码
    private String status;    
    private String createBy;	// 创建者
    private String createByName;
    private String createDate;	// 创建日期
    private String updateBy;	// 更新者
    private String updateByName;
    private String updateDate;	// 更新日期
    private String delFlag; 	// 删除标记（0：正常；1：删除；2：审核）
	
    
    public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getProjectname() {
		return projectname;
	}
	public void setProjectname(String projectname) {
		this.projectname = projectname;
	}
	public String getProjectcode() {
		return projectcode;
	}
	public void setProjectcode(String projectcode) {
		this.projectcode = projectcode;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getCreateBy() {
		return createBy;
	}
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	public String getCreateByName() {
		if (createBy != null && createBy!="") {
        	SysUser user = UserUtils.getSysService().getUserById(createBy);
        	createByName = user!=null? user.getRealname():"administrator";
        }
		return createByName;
	}
	public void setCreateByName(String createByName) {
		this.createByName = createByName;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public String getCreateDate() {
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	public String getUpdateBy() {
		return updateBy;
	}
	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}
	public String getUpdateByName() {
		if (updateBy != null && updateBy!="") {
        	SysUser user = UserUtils.getSysService().getUserById(updateBy);
        	updateByName = user!=null? user.getRealname():"administrator";
        }
		return updateByName;
	}
	public void setUpdateByName(String updateByName) {
		this.updateByName = updateByName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public String getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}
	public String getDelFlag() {
		return delFlag;
	}
	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
    
    
}
